<template > 
    <div class="test">
        <div style="display: flex;"> 
            <div v-if="test.type != 2">
            {{ test.number }}.
            </div>
            <div v-if="test.stem">
                {{ test.stem }}
            </div>
        </div>
        <div v-if="test.sel||selData[test.pid].sel">
            <div v-for="(t,ix) in test.sel?test.sel:selData[test.pid].sel">
                {{ t }}
            </div>
        </div>
    </div>
</template>
<script>
import pagePublic from "@/mixins/pagePublic.js";
import { mapMutations, mapState } from "vuex";
    export default {
        name: "test",
        mixins: [pagePublic],
        props: {
            test:{
                type:Object,
                default:()=>{}
            }
        },
        data(){
            return{
                selData:{}
                // urls:{
                //     list: {
                //         url:this.$api.tem.list,
                //         method:"get",
                //         sync:false,
                //     },
                //     add:this.$api.tem.add,
                //     edit:this.$api.tem.edit,
                //     del:this.$api.tem.del
                // },

                
            }
        },
        computed: {
            ...mapState(['configInfo']),
            
        },
        created() {
            console.log(this.test,9999)
            if(this.test.type == 2){
                this.selData[this.test.topic_id] = {sel:{...this.test.sel},stem:this.test.stem}}
        },
        methods:{
            ...mapMutations(['set_configInfo'])
        }
    }
</script>
<style lang="scss" scoped>

</style>